-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RT 7.4 & RT 7.11: Updated the script with deviation for ASpath set #3365
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 10818209816Details
💛 - Coveralls |
aspathSet.SetAsPathSetMember(aspathMatch) | ||
stmt1.GetOrCreateConditions().GetOrCreateBgpConditions().GetOrCreateMatchAsPathSet().SetAsPathSet(aspathSetName) | ||
stmt1.GetOrCreateConditions().GetOrCreateBgpConditions().GetOrCreateMatchAsPathSet().SetMatchSetOptions(aspMatchSetOptions) | ||
if !deviations.BgpAspathsetUnsupported(dut) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to accept the BgpAspathsetUnsupported deviation, a workaround/alternative needs to be proposed to achieve similar functionality. This could be using CLI configuration applied via a gnmi.Set using union_replace.
For example, does juniper support implementing an OC call-policy which refers to a policy defined in native Juniper configuration that can match on as-paths?
@@ -100,7 +103,6 @@ func configureImportBGPPolicy(t *testing.T, dut *ondatra.DUTDevice, ipv4 string, | |||
cs = append(cs, oc.UnionString(communityMatch)) | |||
} | |||
communitySet.SetCommunityMember(cs) | |||
communitySet.SetMatchSetOptions(commMatchSetOptions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks ok, I see it is moved into a separate, already accepted deviation in line 123.
@@ -273,6 +276,10 @@ func TestCommunitySet(t *testing.T) { | |||
bs := cfgplugins.NewBGPSession(t, cfgplugins.PortCount2, nil) | |||
bs.WithEBGP(t, []oc.E_BgpTypes_AFI_SAFI_TYPE{oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST, oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST}, []string{"port2"}, true, true) | |||
|
|||
if deviations.BgpAspathsetUnsupported(bs.DUT) { | |||
testResults[4] = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above, we need some alternative configuration/policy to achieve the desired behavior of matching on as paths.
@@ -90,7 +90,7 @@ functions. | |||
* conditions/bgp-conditions/match-community-set/config/ | |||
* community-set: "regex-community" | |||
* match-set-options: "ANY" | |||
* actions/config/policy-result = "NEXT_STATEMENT" | |||
* actions/config/policy-result = "ACCEPT_ROUTE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
@@ -415,7 +449,14 @@ func configureImportExportMultifacetMatchActionsBGPPolicy(t *testing.T, dut *ond | |||
t.Fatalf("AppendNewStatement(%s) failed: %v", matchAspathSetMedStatement, err) | |||
} | |||
|
|||
// TODO create as-path-set on the DUT, match-as-path-set not support. | |||
// Configure my_aspath: [ "65512" ] to match_aspath_set_med statement | |||
if !deviations.BgpAspathsetUnsupported(dut) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There needs to be some alternative to using aspath to achieve similar behavior. Without this, I can't accept this deviation.
Fixes #3415 |
RT 7.4 & RT 7.11: Updated the script with deviation for ASpath set
Added policy result as ACCEPT for policy "match_community_regex"